package com.iris.live.services.data.repositories;

import com.iris.live.services.models.PageData;
import com.iris.live.services.models.ResultData;
import com.iris.live.services.services.ApiForLiveService;
import com.iris.live.services.services.CustomerInfoService;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2016/9/5.
 */
@NoRepositoryBean
public interface ApiForLiveRepository {

    /**
     * 获取本店，选取角色可使用功能
     *
     * @param permit
     * @param roleName
     * @return
     */
    public List getAvailablePermissions(String permit, String roleName);

    /**
     * 获取本店可可以接待人员
     *
     * @param permit
     * @return
     */
    public List getAvailableUser(String permit);

    /**
     * 查询sc名下有效线索
     * @param permit
     * @param scCode
     * @return
     */
    public List getClueAboutSC(String permit, String scCode);

    /**
     * 获取经销商内指定状态的人员
     *
     * @param permit
     * @return
     */
    public List getAvailableUsers(String permit, String status);

    /**
     * 获取车型详细不为空的LSH车型list
     *
     * @return
     */
    public List getLshCarNotBlank();

    /**
     * 根据许可获取未删除的经销商
     *
     * @param permit
     * @return
     */
    public List getLshDistributorByPermit(String permit);

    /**
     * 根据车架号查询到GP1/GP2/GP3
     *
     * @param vin
     * @return
     */
    public Map getGPByVin(String vin);

    public List getNowTime();

    public List getLatestUpdatetimeByPermit(String permit);

    public PageData getBenzRental(ApiForLiveService.GetBenzRentalRequst req);

    List getBenzRental(String bTime, String eTime, Integer type, String rate, String carType);

    public List getCarsByPermit1(List<String> permitList, String lv, Map map);

    public List getAllArea(String permit);

    public List getCusRecordByPhone(ApiForLiveService.GetCusRecordByPhoneReq req);

    public List getCusFlowByPermitAndDate(String license, String currDate, String firstDate, String lastDate);

    public List getClueByPermitAndDate(String license, String currDate, String firstDate, String lastDate);

    public List getOrderByPermitAndDate(String license, String currDate, String firstDate, String lastDate);

    ResultData getAllAreaAndPMA();

    Map getGroupRoleInInfo(String role);

    /**
     * 获取销售顾问名下的客户信息(带客户姓名筛选条件 )
     */
    List getCustomers(CustomerInfoService.customersRequest cust);
}
